package Entities;

import javax.persistence.*;

/**
 * Created by Administrator on 2018/4/14/014.
 */
@Entity
@Table(name = "user", schema = "booksite", catalog = "")
public class UserEntity {
    private String userName;
    private String userPassword;
    private String userNickname;
    private String userTag1;
    private String userTag2;
    private String userTag3;
    private String userTag4;
    private String userTag5;
    private String userTag6;
    private Integer tagMark1;
    private Integer tagMark2;
    private Integer tagMark3;
    private Integer tagMark4;
    private Integer tagMark5;
    private Integer tagMark6;

    @Id
    @Column(name = "user_name")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Basic
    @Column(name = "user_password")
    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    @Basic
    @Column(name = "user_nickname")
    public String getUserNickname() {
        return userNickname;
    }

    public void setUserNickname(String userNickname) {
        this.userNickname = userNickname;
    }

    @Basic
    @Column(name = "user_tag1")
    public String getUserTag1() {
        return userTag1;
    }

    public void setUserTag1(String userTag1) {
        this.userTag1 = userTag1;
    }

    @Basic
    @Column(name = "user_tag2")
    public String getUserTag2() {
        return userTag2;
    }

    public void setUserTag2(String userTag2) {
        this.userTag2 = userTag2;
    }

    @Basic
    @Column(name = "user_tag3")
    public String getUserTag3() {
        return userTag3;
    }

    public void setUserTag3(String userTag3) {
        this.userTag3 = userTag3;
    }

    @Basic
    @Column(name = "user_tag4")
    public String getUserTag4() {
        return userTag4;
    }

    public void setUserTag4(String userTag4) {
        this.userTag4 = userTag4;
    }

    @Basic
    @Column(name = "user_tag5")
    public String getUserTag5() {
        return userTag5;
    }

    public void setUserTag5(String userTag5) {
        this.userTag5 = userTag5;
    }

    @Basic
    @Column(name = "user_tag6")
    public String getUserTag6() {
        return userTag6;
    }

    public void setUserTag6(String userTag6) {
        this.userTag6 = userTag6;
    }

    @Basic
    @Column(name = "tag_mark1")
    public Integer getTagMark1() {
        return tagMark1;
    }

    public void setTagMark1(Integer tagMark1) {
        this.tagMark1 = tagMark1;
    }

    @Basic
    @Column(name = "tag_mark2")
    public Integer getTagMark2() {
        return tagMark2;
    }

    public void setTagMark2(Integer tagMark2) {
        this.tagMark2 = tagMark2;
    }

    @Basic
    @Column(name = "tag_mark3")
    public Integer getTagMark3() {
        return tagMark3;
    }

    public void setTagMark3(Integer tagMark3) {
        this.tagMark3 = tagMark3;
    }

    @Basic
    @Column(name = "tag_mark4")
    public Integer getTagMark4() {
        return tagMark4;
    }

    public void setTagMark4(Integer tagMark4) {
        this.tagMark4 = tagMark4;
    }

    @Basic
    @Column(name = "tag_mark5")
    public Integer getTagMark5() {
        return tagMark5;
    }

    public void setTagMark5(Integer tagMark5) {
        this.tagMark5 = tagMark5;
    }

    @Basic
    @Column(name = "tag_mark6")
    public Integer getTagMark6() {
        return tagMark6;
    }

    public void setTagMark6(Integer tagMark6) {
        this.tagMark6 = tagMark6;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        UserEntity that = (UserEntity) o;

        if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
        if (userPassword != null ? !userPassword.equals(that.userPassword) : that.userPassword != null) return false;
        if (userNickname != null ? !userNickname.equals(that.userNickname) : that.userNickname != null) return false;
        if (userTag1 != null ? !userTag1.equals(that.userTag1) : that.userTag1 != null) return false;
        if (userTag2 != null ? !userTag2.equals(that.userTag2) : that.userTag2 != null) return false;
        if (userTag3 != null ? !userTag3.equals(that.userTag3) : that.userTag3 != null) return false;
        if (userTag4 != null ? !userTag4.equals(that.userTag4) : that.userTag4 != null) return false;
        if (userTag5 != null ? !userTag5.equals(that.userTag5) : that.userTag5 != null) return false;
        if (userTag6 != null ? !userTag6.equals(that.userTag6) : that.userTag6 != null) return false;
        if (tagMark1 != null ? !tagMark1.equals(that.tagMark1) : that.tagMark1 != null) return false;
        if (tagMark2 != null ? !tagMark2.equals(that.tagMark2) : that.tagMark2 != null) return false;
        if (tagMark3 != null ? !tagMark3.equals(that.tagMark3) : that.tagMark3 != null) return false;
        if (tagMark4 != null ? !tagMark4.equals(that.tagMark4) : that.tagMark4 != null) return false;
        if (tagMark5 != null ? !tagMark5.equals(that.tagMark5) : that.tagMark5 != null) return false;
        if (tagMark6 != null ? !tagMark6.equals(that.tagMark6) : that.tagMark6 != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = userName != null ? userName.hashCode() : 0;
        result = 31 * result + (userPassword != null ? userPassword.hashCode() : 0);
        result = 31 * result + (userNickname != null ? userNickname.hashCode() : 0);
        result = 31 * result + (userTag1 != null ? userTag1.hashCode() : 0);
        result = 31 * result + (userTag2 != null ? userTag2.hashCode() : 0);
        result = 31 * result + (userTag3 != null ? userTag3.hashCode() : 0);
        result = 31 * result + (userTag4 != null ? userTag4.hashCode() : 0);
        result = 31 * result + (userTag5 != null ? userTag5.hashCode() : 0);
        result = 31 * result + (userTag6 != null ? userTag6.hashCode() : 0);
        result = 31 * result + (tagMark1 != null ? tagMark1.hashCode() : 0);
        result = 31 * result + (tagMark2 != null ? tagMark2.hashCode() : 0);
        result = 31 * result + (tagMark3 != null ? tagMark3.hashCode() : 0);
        result = 31 * result + (tagMark4 != null ? tagMark4.hashCode() : 0);
        result = 31 * result + (tagMark5 != null ? tagMark5.hashCode() : 0);
        result = 31 * result + (tagMark6 != null ? tagMark6.hashCode() : 0);
        return result;
    }
}
